import java.util.*;
public class TestStack {
    public static void main(String[] args) {
        MyStackDemo stack=new MyStackDemo();
        stack.push(12);//入栈
        stack.push(23);
        stack.push(34);
        stack.push(45);
        int x = stack.pop();
        System.out.println(x);
        x = stack.pop();
        System.out.println(x);
        x = stack.peek();//获取栈顶元素 但是不删除
        System.out.println(x);
        x = stack.pop();//弹出一个元素，并且删除
        System.out.println(x);

        boolean flg = stack.isEmpty();
        System.out.println(flg);
        stack.pop();//12
        flg = stack.isEmpty();
        System.out.println(flg);
    }
}
